var e = require("../../../../../@babel/runtime/helpers/regeneratorRuntime"),
  t = require("../../../../../@babel/runtime/helpers/asyncToGenerator"),
  o = require("../../../../../utils/helper/common/index");
Component({
  properties: {
    content: {
      type: Object,
      value: {}
    }
  },
  data: {
    mode: "",
    collection: "",
    id: "",
    is_report: "",
    getPhone: ""
  },
  methods: {
    onComplaint: function () {
      $.getCurrentPage().onComplaint()
    },
    onCollect: function () {
      var n = this;
      return t(e().mark((function t() {
        var r, i, c, a;
        return e().wrap((function (e) {
          for (;;) switch (e.prev = e.next) {
            case 0:
              r = n.data, i = r.id, c = r.mode, a = r.collection, (0, o.switchCollect)({
                id: i,
                mode: c,
                collection: a
              }).then((function (e) {
                200 === e.code ? n.setData({
                  collection: !a
                }) : $.msg(e.msg)
              }));
            case 2:
            case "end":
              return e.stop()
          }
        }), t)
      })))()
    },
    onCall: function () {
      $.getCurrentPage().onCall()
    }
  },
  observers: {
    content: function (e) {
      var t = e.uuid,
        o = e.mode,
        n = e.collection,
        r = e.is_report,
        i = e.getPhone,
        c = e.callText,
        a = e.status;
      e && this.setData({
        id: t,
        mode: o,
        collection: n,
        is_report: r,
        getPhone: i,
        callText: c,
        status: a
      })
    }
  }
});